package com.t11;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

/**
 * Created by xuyiwei on 2018/7/22.
 */
public class E17 {
    public static void main(String[] args) {
        Map<String,Gerbil> map = new HashMap<>();
        map.put("sport1",new Gerbil(1));
        map.put("sport2",new Gerbil(2));
        map.put("sport3",new Gerbil(3));
        map.put("sport4",new Gerbil(4));

        Set<String> set = map.keySet();
        Iterator<String> iterator = set.iterator();
        while(iterator.hasNext()){
            String key = iterator.next();
            Gerbil g = map.get(key);
            System.out.println(g);
        }
    }
}
